//package com.arcvideo.acsconnect.ui.presenter;
//
//import com.arcvideo.acsconnect.app.AcsConnectApplication;
//import com.arcvideo.acsconnect.app.GlobalConstant;
//import com.arcvideo.acsconnect.app.UserDataCenter;
//import com.arcvideo.acsconnect.rest.model.FeedbackRequestBean;
//import com.arcvideo.acsconnect.rest.model.ResultBean;
//import com.arcvideo.acsconnect.rest.service.AppService;
//import com.arcvideo.acsconnect.ui.view.FeedbackView;
//import com.arcvideo.rtcmessage.RtcMessageClient;
//import com.arcvideo.rtcmessage.model.ImRequestInfo;
//import com.framework.core.bean.RestError;
//import com.framework.core.mvp.BasePresenter;
//import com.framework.core.mvp.IObserver;
//import com.framework.core.utils.AppUtil;
//import com.framework.core.utils.DateUtil;
//
//import rx.android.schedulers.AndroidSchedulers;
//import rx.schedulers.Schedulers;
//
//public class FeedbackPresenter extends BasePresenter<FeedbackView> {
//
//    AppService mAppService;
//
//    public FeedbackPresenter() {
//        super();
//        mAppService = mRetrofit.create(AppService.class);
//    }
//
//    public void feedback(String msg) {
//        mAppService.feedback(
//                "bigDateUserFeedback",
//                buildRequestBean(msg))
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//                .subscribe(new IObserver<ResultBean>(this, true) {
//                    @Override
//                    public boolean onFailed(RestError restError) {
//                        return false;
//                    }
//
//                    @Override
//                    public void onNext(ResultBean resultBean) {
//                        getMvpView().onFeedbackSuccess();
//                    }
//                });
//    }
//
//    private FeedbackRequestBean buildRequestBean(String msg) {
//        FeedbackRequestBean requestBean = new FeedbackRequestBean();
//        ImRequestInfo imRequestInfo = RtcMessageClient.getInstance().getImRequestInfo();
//        if (null != imRequestInfo) {
//            requestBean.setCustomerid(imRequestInfo.getCustomerId() + "");
//            requestBean.setMemberid(imRequestInfo.getMemberid() + "");
//            requestBean.setOrgid(imRequestInfo.getOrgId());
//            requestBean.setOstype(GlobalConstant.OSTYPE_APP_ANDROID);
//            requestBean.setSessionid(imRequestInfo.getSessionid() + "");
//            requestBean.setUserid(imRequestInfo.getUserId());
//            requestBean.setVersion(AppUtil.getVersionName(AcsConnectApplication.getInstance()));
//            requestBean.setNickname(imRequestInfo.getNickname());
//            requestBean.setTime(DateUtil.getDateStrFromMillions(DateUtil.getCurrentLong(), DateUtil.FORMAT_TIME));
//            requestBean.setServerAddr(UserDataCenter.getInstance().getRtcAddress());
//            requestBean.setDevicetype(AppUtil.getDeviceBrand() + "," + AppUtil.getSystemModel());
//            requestBean.setErrorcode(RtcMessageClient.getInstance().getErrorCode() + "");
//            requestBean.setSystemversion(AppUtil.getSystemVersion());
//        }
//        requestBean.setMsg(msg);
//        return requestBean;
//    }
//}